\testfile{pgfplotstest.misc.tex}
\testsection{Paths after addplot}
\testsubsection{plot coordinates}
\testsubsubsection{without space after 'coordinates'}
\starttikzpicture
\startaxis[ymin=-1,ymax=2]
\addplot+[fill=blue!50!black] coordinates{(0,0.5) (1,1)} |- (axis cs:0,-0.5) -- cycle;
\stopaxis
\stoptikzpicture

\testsubsubsection{with space after 'coordinates'}
\starttikzpicture
\startaxis[ymin=-1,ymax=2]
\addplot+[fill=blue!50!black] coordinates {(0,0.5) (1,1)} |- (axis cs:0,-0.5) -- cycle;
\stopaxis
\stoptikzpicture

\testsubsubsection{using closedcycle path}
\starttikzpicture
\startaxis[ymin=-1,ymax=3]
\addplot coordinates {(3,0.5) (4,2) (5,1)} ;
\addplot+[fill=blue!50!black] coordinates {(3,0.5) (4,2) (5,1)}
	\closedcycle;
\stopaxis
\stoptikzpicture

\testsubsection{plot table}
\starttikzpicture
\startaxis
\addplot+[fill=blue!50!black] table[x index=0,y index=1,header=false]{plotdata/pgfplotstest_plot2.gnuplot} |- (axis cs:0,-1) -- cycle;
\stopaxis
\stoptikzpicture

\testsubsection{plot function}
\starttikzpicture
\startaxis
\addplot plot[id=parable,domain=-5:5] function{4*x**2 - 5} node[pin=180:{$4x^2-5$}]{};
\stopaxis
\stoptikzpicture


\testsection{Title-option}
\starttikzpicture
\startloglogaxis[title=A test title,xlabel=Dof,ylabel=Error]
\loglogtestplot
\stoploglogaxis
\stoptikzpicture

\testsection{Filter test}
{%
\def\myOwnYfilter#1\to#2{%
	\def#2{0.5}%
}%
\starttikzpicture
%
\startaxis[yfilter={\myOwnYfilter}]
\addplot plot coordinates {
	(4,0)
	(6,1)
};
\stopaxis
\stoptikzpicture

\starttikzpicture
\startaxis[y filter/.code={\def\pgfmathresult{0.5}}]
\addplot plot coordinates {
	(4,0)
	(6,1)
};
\stopaxis
\stoptikzpicture

\starttikzpicture
\startaxis[x filter/.code={\ifnum\coordindex>4\def\pgfmathresult{}\fi}]
\addplot (\x,\x^2);
\stopaxis
\stoptikzpicture
}%

\testsection{Test for addplot+[...]}
{
\pgfplotsset{every axis legend/.append style={at={(1.03,1)},anchor=north west}}
No Change:

\starttikzpicture
\startaxis
\smallplotstest

\addplot plot coordinates {
	(4,0)
	(6,1)
};
\legend{eins\\zwei\\}
\stopaxis
\stoptikzpicture

with change:

\starttikzpicture
\startaxis
\smallplotstest

\addplot+[only marks] plot coordinates {
	(4,0)
	(6,1)
};
\legend{eins\\zwei\\}
\stopaxis
\stoptikzpicture
}

\testsection{Hide axis test}
\starttikzpicture
	\startaxis
		\smallplotstest
	\stopaxis
\stoptikzpicture
\starttikzpicture
	\startaxis[hide axis]
		\smallplotstest
	\stopaxis
\stoptikzpicture
\vskip 1cm
\noindent
\starttikzpicture
	\startaxis[hide axis,title=A plot with hidden axis]
		\smallplotstest
	\stopaxis
\stoptikzpicture
\starttikzpicture
	\startaxis[hide axis,title=A plot with hidden axis]
		\smallplotstest
		\legend{A legend\\}
	\stopaxis
\stoptikzpicture


\testsection{disabledatascaling / disablelogfilter}
\testsubsection{disabledatascaling}
\starttikzpicture
\startaxis[disabledatascaling]
	\smallplotstest
\stopaxis
\stoptikzpicture

\testsubsection{disabledatascaling + explicit limits}
\starttikzpicture
\startaxis[disabledatascaling, xmin=0, xmax=1, ymin=0, ymax=1]
	\smallplotstest
\stopaxis
\stoptikzpicture

\testsubsection{disabledatascaling + explicit limits + error bars}
\starttikzpicture
\startaxis[disabledatascaling, xmin=-0.5, xmax=1.5, ymin=-0.5, ymax=1.5]
\addplot plot[
	/pgfplots/error bars/.cd,
	y dir=both,y explicit,
	x dir=both,x fixed relative=0.5,
	error mark=diamond*,
]
	coordinates
	{(0,0) +- (0.5,0.1)
	(0.1,0.1)  +- (0.05,0.2)
	(0.2,0.2) 	+- (0,0.05)
	(0.5,0.5)
	(1,1)};
\stopaxis
\stoptikzpicture
